<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>登陆/注册</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../css/mui.min.css">
		<link rel="stylesheet" href="../css/center.css">
		<style>
			.logo-div{
				text-align: center;
				margin:80px 0 20px 0;
			}
			.logo-div img{
				width:150px;
				height:150px;
			}
			.btn-div button{
				width: 90%;
				height:45px;
				margin:10px 5%;
			}
			.login-div{
				margin: 180px 5%;
				width: 90%;
			}
			.login-div input{
				width:100%;
				height:30px;
				margin:5px;
				padding:20px;
				border:none;
				/* background-color: #e5e5f8; */
			}
			.login-div button{
				width:100%;
				margin:10px 0;
				padding: 10px;
			}
			.login-div span{
				color:#ef5d24;
			}
			/*问题反馈在setting页面单独的css==end*/
		</style>
	</head>
	<body class="mui-fullscreen">
		<!--页面主结构开始-->
		<div id="app" class="mui-views">
			<div class="mui-view">
				<div class="mui-navbar">
				</div>
				<div class="mui-pages">
				</div>
			</div>
		</div>
		<!-- 未登录时的页面 选择登陆或注册 -->
		<div id="beforeloginpage" class="mui-page">
			<div class="mui-navbar-inner mui-bar mui-bar-nav">
				<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left">
					<span class="mui-icon mui-icon-left-nav"></span>
				</button>
				<h1 class="mui-center mui-title">登陆/注册</h1>
			</div>
			<div class="mui-page-content">
				<div class="logo-div">
					<img src="../images/logo.png"/>
				</div>
				<div class="btn-div">
					<a href="#login"><button type="button" class="mui-btn-danger">登录</button></a>
					<a href="#register"><button type="button" class="mui-btn-royal mui-btn-outlined">没有账号？快去注册呀~</button></a>
				</div>
			</div>
		</div>
		<!-- 未登录时的页面结束 -->
		<!-- 注册开始 -->
		<div id="register" class="mui-page">
			<div class="mui-navbar-inner mui-bar mui-bar-nav">
				<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left">
					<span class="mui-icon mui-icon-left-nav"></span>
				</button>
				<h1 class="mui-center mui-title">注册</h1>
			</div>
			<div class="mui-page-content">
				<div style="text-align: center;margin:20px 0;">
					<img src="#" id="myhead" onerror="this.onerror='';src='../images/person.png' " style="width:150px;height:150px;border-radius: 45%;"/>
					<!-- <span style="display: flex;justify-content: center;">点击图片更改头像</span> -->
				</div>
				<!-- Ajax提交头像开始 -->
				<form id="uploadForm" enctype="multipart/form-data"  style="display: flex;justify-content: center;">
				  <input type="file" accept="image/*" id="addhead" name="file" value="选择头像" style="width:150px;"> 
				</form>
				<!-- Ajax提交模头像结束 -->
				<form class="mui-input-group">
					<div class="login-div" style="margin-top: 0px;">					
						<input id="reg_Name" placeholder="用户名"/>
						<input id="phoneNumber" placeholder="手机号码"/>
						<input id="reg_password" type="password" placeholder="密码"/>
						<input id="re_password" type="password" placeholder="确认密码"/>
						<button type="button" id="user_register" style="border:none;background-color: #25b887;">注册</button>
					</div>
				</form>
			</div>
		</div>
		<!-- 注册结束 -->
		<!-- 登录开始 -->
		<div id="login" class="mui-page">
			<div class="mui-navbar-inner mui-bar mui-bar-nav">
				<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left">
					<span class="mui-icon mui-icon-left-nav"></span>
				</button>
				<h1 class="mui-center mui-title">登录</h1>
			</div>
			<div class="mui-page-content">
				<div class="login-div">
					<input id="userName" placeholder="请输入用户名或手机号码~"/>
					<input id="password" type="password" placeholder="请输入密码~"/>
					<button type="button" class="mui-btn-danger" id="user_login">登录</button>
					<a href="#forgrt_pwd"><span class="mui-pull-left">忘记密码？</span></a>
					<a href="#register"><span class="mui-pull-right">新用户注册</span></a>
				</div>
			</div>
		</div>
		<!-- 登录结束 -->
		<!-- 点击找回密码 -->
		<div id="forgrt_pwd" class="mui-page">
			<div class="mui-navbar-inner mui-bar mui-bar-nav">
				<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left">
					<span class="mui-icon mui-icon-left-nav"></span>
				</button>
				<h1 class="mui-center mui-title">找回密码</h1>
			</div>
			<div class="mui-page-content">
				<div class="login-div">
					<input id="name" placeholder="请输入用户名~"/>
					<input id="mail" placeholder="请输入注册时的邮箱~"/>
					<input id="verification" class="mui-pull-left" placeholder="请输入验证码" style="width:70%;"/>
					<input type="button" id="send" class="mui-pull-right" value="发送" style="width:25%;margin:5px 0px;padding:0px;height:40px;background-color: #09a267;color:#fff;"/>
					<button type="button" class="mui-btn-danger" id="findPwd">找回密码</button>
				</div>
			</div>
		</div>
		<!-- 点击找回密码结束 -->
		<!-- 修改密码 -->
		<div id="modify_pwd" class="mui-page">
			<div class="mui-navbar-inner mui-bar mui-bar-nav">
				<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left">
					<span class="mui-icon mui-icon-left-nav"></span>
				</button>
				<h1 class="mui-center mui-title">修改密码</h1>
			</div>
			<div class="mui-page-content">
				<div class="login-div">
					<input type="password" id="mo_password" placeholder="请输入新密码~"/>
					<input type="password" id="mo_re_password" placeholder="再次输入密码~"/>
					<button type="button" style="background-color: #09a267;color:#fff;" id="modifyPwd">修改密码</button>
				</div>
			</div>
		</div>
		<!-- 修改密码结束 -->
	</body>
	<script src="../js/mui.min.js "></script>
	<script src="../js/mui.view.js "></script>
	<script src="../js/ajax.js"></script>
	<script src="../jquery.mobile-1.4.5/jquery-1.8.3.min.js"></script>
	<script src="../js/md5.js"></script>
	<script src="../js/conf.js"></script>
	<script src="../js/jquery.cookie.js"></script>
	<script src="../js/image_compress.js"></script>
	<script src="../js/user.js"></script>
	<script>
		mui.init();
		//初始化单页view
		var viewApi = mui('#app').view({
			defaultPage: '#beforeloginpage'
			// defaultPage: '#forgrt_pwd'
		});
		
// 		var originalHeight = document.documentElement.clientHeight || document.body.clientHeight;
// 		window.onresize = function () {
// 			var resizeHeight = document.documentElement.clientHeight || document.body.clientHeight;
// 			if(resizeHeight * 1 < originalHeight * 1) {
// 			}else{
// 			}
// 		}
		var view = viewApi.view;
		(function($) {
			//处理view的后退与webview后退
			var oldBack = $.back;
			$.back = function() {
				if (viewApi.canBack()) { //如果view可以后退，则执行view的后退
					viewApi.back();
				} else { //执行webview后退
					oldBack();
				}
			};
			//监听页面切换事件方案1,通过view元素监听所有页面切换事件，目前提供pageBeforeShow|pageShow|pageBeforeBack|pageBack四种事件(before事件为动画开始前触发)
			//第一个参数为事件名称，第二个参数为事件回调，其中e.detail.page为当前页面的html对象
			view.addEventListener('pageBeforeShow', function(e) {
				//console.log(e.detail.page.id + ' beforeShow');
			});
			view.addEventListener('pageShow', function(e) {
				//console.log(e.detail.page.id + ' show');
			});
			view.addEventListener('pageBeforeBack', function(e) {
				//console.log(e.detail.page.id + ' beforeBack');
			});
			view.addEventListener('pageBack', function(e) {
				//console.log(e.detail.page.id + ' back');
			});
		})(mui);
	</script>
</html>
